<template>
  <i class="icon-wrapper icon">
    <svg class="svg-icon" aria-hidden="true" focusable="false" fill="currentColor">
      <use :xlink:href="iconName"/>
    </svg>
  </i>
</template>
<style>
  .icon-wrapper {
    margin-right: 10px;
    min-width: 14px;
    font-size: 14px;
  }
  .svg-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
  }

  .icon {
    display: inline-block;
    color: inherit;
    font-style: normal;
    line-height: 0;
    text-align: center;
    text-transform: none;
    vertical-align: -0.125em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
</style>
<script>
export default {
  props: {
    iconClass: {
      type: String,
      required: true
    }
  },
  computed: {
    iconName () {
      return `#icon-${this.iconClass}`
    }
  }
}
</script>
